6f528bbc1454ee66f2fa26d7c01c8de28290f649,minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/util/ConfigTransformer.java,ConfigTransformer,addConnection,#Element#Map#,600

Before Change


        try {
            Map<String, Object> connectionProperties = (Map<String, Object>) topLevelYaml.get(CONNECTION_PROPS_KEY);
            Map<String, Object> remoteProcessingGroup = (Map<String, Object>) topLevelYaml.get(REMOTE_PROCESSING_GROUP_KEY);
            Map<String, Object> inputPort = (Map<String, Object>) remoteProcessingGroup.get(INPUT_PORT_KEY);
            Map<String, Object> processorConfig = (Map<String, Object>) topLevelYaml.get(PROCESSOR_CONFIG_KEY);

            if (inputPort.get(ID_KEY) == null || processorConfig.get(CLASS_KEY) == null) {
                // Only add the connection if the input port and processor config are created
                return;
            }

            final Document doc = parentElement.getOwnerDocument();
            final Element element = doc.createElement("connection");
            parentElement.appendChild(element);
            addTextElement(element, "id", "Connection");
            addTextElement(element, "name", getValueString(connectionProperties, NAME_KEY));

            final Element bendPointsElement = doc.createElement("bendPoints");
            element.appendChild(bendPointsElement);

            addTextElement(element, "labelIndex", "1");
            addTextElement(element, "zIndex", "0");

            addTextElement(element, "sourceId", "Processor");
            addTextElement(element, "sourceGroupId", "Root-Group");
            addTextElement(element, "sourceType", "PROCESSOR");

After Change


                addTextElement(element, "destinationType", "REMOTE_INPUT_PORT");
            } else {
                addTextElement(element, "destinationGroupId", "Root-Group");
                addTextElement(element, "destinationType", "PROCESSOR");
            }

            addTextElement(element, "relationship", connectionProperties.getSourceRelationshipName());